package com.bawei.module_apps.local


import com.bawei.module_apps.R
import com.bw.apps.local.entity.LocalAppsEntity
import com.bw.quickadapter.BaseQuickAdapter
import com.bw.quickadapter.BaseViewHolder

class LocalAppsAdapter : BaseQuickAdapter<LocalAppsEntity>(R.layout.item_local_apps) {

    init {
        addItemChildClick(R.id.local_del_img)
    }

    override fun convert(holder: BaseViewHolder?, item: LocalAppsEntity?) {
        holder!!.let {
            it.setImage(R.id.net_apps_child_img,com.bawei.library_base.R.drawable.icon81)
            it.setText(R.id.net_apps_child_title!!,item!!.packageName)
            it.setVisibility(R.id.local_del_img,item.showEdt)
            it.setImage(R.id.local_del_img,if (item!!.edtFlag)com.bawei.library_base.R.drawable.icon712 else com.bawei.library_base.R.drawable.icon706)
        }
    }
}